// 节流函数
export function rafThrottle(fn) {
  let flag = false
  return function fnBindRaf(...args) {
    if (flag) return
    flag = true
    requestAnimationFrame(() => {
      flag = false
      fn.apply(this, args)
    })
  }
}
